package com.baseframe.sys.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baseframe.sys.entity.AppClass;
import com.baseframe.sys.service.IAppClassService;
import com.baseframe.sys.service.dao.AppClassRepository;

/**
 * @author mzl
 */
@Service("appclassService")
public class AppClassServiceImpl implements IAppClassService {


    @Autowired
    private AppClassRepository dao;

    @Override
    public List<AppClass> selectList() {
        return dao.findAll();
    }

    @Override
    public AppClass selectById(int id) {
        return dao.findOne(id);
    }


    @Override
    public List<AppClass> queryListParentId(int parentId) {
        return dao.findByParentid(parentId);
    }



    @Override
    public void delete(int id) {
        //删除菜单
        dao.delete(id);
    }

    @Override
    public void insert(AppClass AppClass) {
        dao.save(AppClass);
    }

    @Override
    public void update(AppClass AppClass) {
        dao.save(AppClass);
    }

	
}
